﻿<!doctype html>
<html>
 <head>
  <title>登录页面</title>
  <meta charset="utf-8"/>
  <!--<link rel="stylesheet" href="./zhuce.css">-->
  <style>
  *{margin:0px;padding:0px;}


#middle{width:100%;height:600px;border:0px solid red;margin:auto;margin-top:70px;}
#left{width:530px;height:450px;border:0px solid red;margin-left:15%;}
#right{width:500px;height:300px;border:0px solid red;float:right;margin-top:-390px;margin-right:20%;}
#db{
	width:100%;
	height:50px;
	border:0px solid red;
	line-height:50px;
	}
  p{
	margin-left:43%;
	font-size:15px;
	}
#jy{
	width:100%;
	height:50px;
	border:0px solid red;
	}
.p1{
	margin-left:40%;font-size:10px
	}
	.dh{height:10px;}
	.sp{display:inline-block;border:0px solid red;width:90px;height:30px;}
	#top
	{
		width:100%;
		height:150px;
		border:0px solid red;
	}
	#tt{width:100%;height:30px;border:0px solid red;}
	.t1{color:#909090;float:left;font-size:1.1em;}
	.t2{color:#909090;float:right;font-size:1.1em;}
	td{font-size:1.3em;font-weight:bold;}
	#dh{width:100%;height:50px;border:0px solid red;background-color:#1F81B0;}

	ul{list-style-type:none;height:50px;}

	ul li{float:left;margin:10px;margin-left:25px;line-height:30px;color:white;}

	li a{text-decoration:none;color:white;}

	.d1{width:100%;height:50px;border:0px solid red;line-height:50px;}
	.d2{margin-left:50px;}
	.m1{font-size:13px;}
	#dh{width:100%;height:50px;border:0px solid red;background-color:#1F81B0;}

</style>
 </head>

 <body>
<div id="top">
	<div id="tt">
			<div class="t1" >
				<span class="sy"><a href="index.php">网站首页</a></span>
				<span class="sy"><a href="index.php">用户中心</a></span>
				<span class="sy"><a href="shopcar.php">我的购物车(0)</a></span>
				<span class="sy"><a href="user_order.php">我的订单(0))</a></span>
			</div>
			<div class="t2">
					<?php if(!isset($_COOKIE["username"])){ ?>
					<a href="./login.php">登录</a>|
					<a href="./regist.php">免费注册</a>|
					<?php }else{?>
					<font size=3 color="#ababab">您好！<?=$_COOKIE["username"]?>，<b>欢迎来到欣才商城！</b>|
					<a href="./index.php">退出</a>|<a href="./regist.php">免费注册</a></font>
					<?php }?>
			</div>
	</div>
	<hr color="#e3e3e3"/>

		<div>
			<table width="500px" height="30px">
				<tr>
					<td><font color="#4577fc" style="margin-left:50px;">欣才</font></td>
					<td>商城</td>
					<td>
						<input type="text" name="" style="height:30px;"/>
						<input type="submit" name="sub" value="搜索" style="height:35px;" />
					</td>
				</tr>
			</table>
		</div>
		<div id="dh">
			<ul>
				<li><a href="index.php">首页</a></li>
				<li>|</li>
				<li><a href="index.php">商城</a></li>
				<li>|</li>
				<li><a href="">新闻</a></li>
				<li>|</li>
				<li><a href="">活动</a></li>
				<li>|</li>
				<li><a href="">论坛</a></li>
			</ul>
		</div>
</div>
	<div id="middle">
		<div id="left">
			  <div>
				<img src="../img/1.png" width="450px">
			  </div>

			  <div id="z1">
				  <font class="zqr" size=5 color="#5c5c5c">
				  </font>
			  </div>

			  <div id="z2">
				<font color="#919191" class="zqr"></font>
			  </div>
		</div>

		<div id="right">
			<form action="do_login.php" method="post" id="form" onsubmit="return check();">
				<table width="450px" height="200px">
					<tr>
						<td><font size="5px">账户:</font></td>
						<td><input type="text" name="usname" value="<?=isset($_COOKIE['usname'])?$_COOKIE['usname']:"" ?>" style="height:35px;width:280px;"><font color="red">*</font><span id="tip_u" class="sp"></span></td>
					</tr>
					<tr>
						<td><font size="5px">密码:</font></td>
						<td><input type="password" name="pass" value="<?=isset($_COOKIE['pwd'])?$_COOKIE['pwd']:"" ?>" style="height:35px;width:280px;"/><font color="red">*</font><span id="tip_m" class="sp"></span></td>
					</tr>
					<tr>
						<td colspan=2><hr color="#f1f1f1"/></td>
					</tr>
					<tr>
						<td></td>
						<td><input type="checkbox" name="remember" value="1"<?=isset($_COOKIE['rem'])?'checked':""?>/>是否记住密码</td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" name="sub" value="登录" style="width:150px;height:35px;"/></td>
					</tr>
				</table>
			
				</form>
		</div>	
		</div>
	</div>
	
	<div>
		<hr color="#e5e5e5"/>
	</div>
	<div id="db">
		<p>关于我们法律声明工作机会联系我们</p>
	</div>
	<div id="jy">
		<p class="p1">Copyright@2013 Thinksite Co.Let night reserved 经营许可证编号：苏A-12345678</p>
	</div>
</div>
 </body>
<script type="text/javascript">
	tip_u=document.getElementById("tip_u");
	tip_m=document.getElementById("tip_m");
		form.usname.onblur=function()
		{
			if(form.usname.value=="")
			{
				tip_u.style.color="red";
				tip_u.innerHTML="不能为空";
			}
		}
		form.pass.onblur=function()
		{
			if(form.pass.value=="")
			{
				tip_m.style.color="red";
				tip_m.innerHTML="不能为空";
			}
		}
	function check()
	{
		if(form.usname.value==""||form.pass.value=="")
		{
			alert("用户名和密码不能为空");
			return false;
		}
		return true;
	}
</script>
</html>